package com.hunau.cxb.service;

import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author hb
 * @create 2020-03-22 10:44
 */
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,readOnly = true,timeout = -1,rollbackFor = {Exception.class})
public interface BookService {
    /**
     * 买书的逻辑
     * @param isbn 书籍编号
     * @param username 账户名称
     * @param nums 购买数量
     */
    void buyBook(String isbn,String username,int nums) throws Exception;
}
